var $merQrCodeDialog;
// 商戶视图模块初始化
function initView() {
    bindEvent();
    $merQrCodeDialog = $("#merQrCodeDialog");
    $("#fanhui").on("touchstart", function() {
        location.href = LoginInit_URL;
    });
}
// 显示商户二维码
function showMerQrCode(ticket) {
    $merQrCodeDialog.css({
        "opacity": "1",
        "display": ""
    });
}


// 绑定事件
function bindEvent() {
    $("#settingBtn").on("touchend", function() {
        setTimeout(function() {
            location.href = "./userSettings.html";
        }, 200);

    });
    $("#query").on("touchend", function() {
        setTimeout(function() {
            location.href = "./accountInquiry.html";
        }, 200);
        
    });
    $("#take").on("touchend", function() {
        setTimeout(function() {
            location.href = "./takeMoney.html";
        }, 200);
        
    });
    $("#query_detail").on("touchend", function() {
        setTimeout(function() {
            location.href = "./tradeDetail.html";
        }, 200);
        
    });

    $("#closeMerQrCode").on("touchend", function() {
        $("#merQrCodeDialog").fadeOut(200);
    });

}
// 显示loading
function showLoadingDialog() {
    $("#loadingDialog").css({
        "opacity": "1",
        "display": ""
    });
}

// 隐藏loading
function hideLoadingDialog () {
    $("#loadingDialog").fadeOut(200);
}


export {
    initView,
    showMerQrCode,
    showLoadingDialog,
    hideLoadingDialog
}